#pragma once
#include "f2c.h"

using namespace System;

namespace SmartMathLibrary
{
  namespace OdePack
  {

    public ref class ManagedOdePackProvider
    {
      public:
        static double log(double x);
        static double sqrt(double x);
        static double atan(double x);
        static double pow_dd(double x, double y);
        static double pow_dd(doublereal *ap, doublereal *bp);
        static double d_sign(doublereal *a, doublereal *b);
        static double r_sign(real *a, real *b);
        static double pow_ri(real *ap, integer *bp);
        static void s_copy(register char *a, register char *b, ftnlen la,
          ftnlen lb);
        static double pow_di(doublereal *ap, integer *bp);

        static int slsode_(S_fp f, integer *neq, real *y, real *t, real *tout,
          integer *itol, real *rtol, real *atol, integer *itask, integer
          *istate, integer *iopt, real *rwork, integer *lrw, integer *iwork,
          integer *liw, U_fp jac, integer *mf);
        static int slsodes_(S_fp f, integer *neq, real *y, real *t, real *tout,
          integer *itol, real *rtol, real *atol, integer *itask, integer
          *istate, integer *iopt, real *rwork, integer *lrw, integer *iwork,
          integer *liw, U_fp jac, integer *mf);
        static int slsoda_(S_fp f, integer *neq, real *y, real *t, real *tout,
          integer *itol, real *rtol, real *atol, integer *itask, integer
          *istate, integer *iopt, real *rwork, integer *lrw, integer *iwork,
          integer *liw, U_fp jac, integer *jt);
        static int slsodar_(S_fp f, integer *neq, real *y, real *t, real *tout,
          integer *itol, real *rtol, real *atol, integer *itask, integer
          *istate, integer *iopt, real *rwork, integer *lrw, integer *iwork,
          integer *liw, U_fp jac, integer *jt, U_fp g, integer *ng, integer
          *jroot);
        static int slsodpk_(S_fp f, integer *neq, real *y, real *t, real *tout,
          integer *itol, real *rtol, real *atol, integer *itask, integer
          *istate, integer *iopt, real *rwork, integer *lrw, integer *iwork,
          integer *liw, U_fp jac, U_fp psol, integer *mf);
        static int slsodkr_(S_fp f, integer *neq, real *y, real *t, real *tout,
          integer *itol, real *rtol, real *atol, integer *itask, integer
          *istate, integer *iopt, real *rwork, integer *lrw, integer *iwork,
          integer *liw, U_fp jac, U_fp psol, integer *mf, U_fp g, integer *ng,
          integer *jroot);
        static int slsodi_(S_fp res, U_fp adda, U_fp jac, integer *neq, real *y,
          real *ydoti, real *t, real *tout, integer *itol, real *rtol, real
          *atol, integer *itask, integer *istate, integer *iopt, real *rwork,
          integer *lrw, integer *iwork, integer *liw, integer *mf);
        static int slsoibt_(S_fp res, U_fp adda, U_fp jac, integer *neq, real
          *y, real *ydoti, real *t, real *tout, integer *itol, real *rtol, real
          *atol, integer *itask, integer *istate, integer *iopt, real *rwork,
          integer *lrw, integer *iwork, integer *liw, integer *mf);
        static int slsodis_(S_fp res, U_fp adda, U_fp jac, integer *neq, real
          *y, real *ydoti, real *t, real *tout, integer *itol, real *rtol, real
          *atol, integer *itask, integer *istate, integer *iopt, real *rwork,
          integer *lrw, integer *iwork, integer *liw, integer *mf);

        static int sgefa_(real *a, integer *lda, integer *n, integer *ipvt,
          integer *info);
        static int sgesl_(real *a, integer *lda, integer *n, integer *ipvt,
          real *b, integer *job);
        static int sgbfa_(real *abd, integer *lda, integer *n, integer *ml,
          integer *mu, integer *ipvt, integer *info);
        static int sgbsl_(real *abd, integer *lda, integer *n, integer *ml,
          integer *mu, integer *ipvt, real *b, integer *job);
        static int saxpy_(integer *n, real *sa, real *sx, integer *incx, real
          *sy, integer *incy);
        static int scopy_(integer *n, real *sx, integer *incx, real *sy,
          integer *incy);
        static real sdot_(integer *n, real *sx, integer *incx, real *sy,
          integer *incy);
        static real snrm2_(integer *n, real *sx, integer *incx);
        static int sscal_(integer *n, real *sa, real *sx, integer *incx);
        static integer isamax_(integer *n, real *sx, integer *incx);
        static int xerrwv_(char *msg, integer *nmes, integer *nerr, integer
          *level, integer *ni, integer *i1, integer *i2, integer *nr, real *r1,
          real *r2, ftnlen msg_len);
        static int xsetf_(integer *mflag);
        static int xsetun_(integer *lun);
        static integer ixsav_(integer *ipar, integer *ivalue, logical *iset);
        static integer iumach_();

        static real rumach_();
        static int rumsum_(real *a, real *b, real *c__);
        static int scfode_(integer *meth, real *elco, real *tesco);
        static int sintdy_(real *t, integer *k, real *yh, integer *nyh, real
          *dky, integer *iflag);
        static int sprepj_(integer *neq, real *y, real *yh, integer *nyh, real
          *ewt, real *ftem, real *savf, real *wm, integer *iwm, S_fp f, S_fp
          jac);
        static int ssolsy_(real *wm, integer *iwm, real *x, real *tem);
        static int ssrcom_(real *rsav, integer *isav, integer *job);
        static int sstode_(integer *neq, real *y, real *yh, integer *nyh, real
          *yh1, real *ewt, real *savf, real *acor, real *wm, integer *iwm, S_fp
          f, U_fp jac, S_fp pjac, S_fp slvs);
        static int sewset_(integer *n, integer *itol, real *rtol, real *atol,
          real *ycur, real *ewt);
        static real svnorm_(integer *n, real *v, real *w);
        static int siprep_(integer *neq, real *y, real *rwork, integer *ia,
          integer *ja, integer *ipflag, U_fp f, U_fp jac);
        static int sprep_(integer *neq, real *y, real *yh, real *savf, real
          *ewt, real *ftem, integer *ia, integer *ja, real *wk, integer *iwk,
          integer *ipper, S_fp f, S_fp jac);
        static int jgroup_(integer *n, integer *ia, integer *ja, integer *maxg,
          integer *ngrp, integer *igp, integer *jgp, integer *incl, integer
          *jdone, integer *ier);
        static int adjlr_(integer *n, integer *isp, integer *ldif);
        static int cntnzu_(integer *n, integer *ia, integer *ja, integer *nzsut)
          ;
        static int sprjs_(integer *neq, real *y, real *yh, integer *nyh, real
          *ewt, real *ftem, real *savf, real *wk, integer *iwk, S_fp f, S_fp
          jac);
        static int ssolss_(real *wk, integer *iwk, real *x, real *tem);
        static int ssrcms_(real *rsav, integer *isav, integer *job);
        static int sodrv_(integer *n, integer *ia, integer *ja, real *a,
          integer *p, integer *ip, integer *nsp, integer *isp, integer *path,
          integer *flag__);
        static int md_(integer *n, integer *ia, integer *ja, integer *max__,
          integer *v, integer *l, integer *head, integer *last, integer *next,
          integer *mark, integer *flag__);
        static int mdi_(integer *n, integer *ia, integer *ja, integer *max__,
          integer *v, integer *l, integer *head, integer *last, integer *next,
          integer *mark, integer *tag, integer *flag__);
        static int mdm_(integer *vk, integer *tail, integer *v, integer *l,
          integer *last, integer *next, integer *mark);
        static int mdp_(integer *k, integer *ek, integer *tail, integer *v,
          integer *l, integer *head, integer *last, integer *next, integer
          *mark);
        static int mdu_(integer *ek, integer *dmin__, integer *v, integer *l,
          integer *head, integer *last, integer *next, integer *mark);
        static int ssro_(integer *n, integer *ip, integer *ia, integer *ja,
          real *a, integer *q, integer *r__, logical *dflag);
        static int scdrv_(integer *n, integer *r__, integer *c__, integer *ic,
          integer *ia, integer *ja, real *a, real *b, real *z__, integer *nsp,
          integer *isp, real *rsp, integer *esp, integer *path, integer *flag__)
          ;
        static int snroc_(integer *n, integer *ic, integer *ia, integer *ja,
          real *a, integer *jar, real *ar, integer *p, integer *flag__);
        static int snsfc_(integer *n, integer *r__, integer *ic, integer *ia,
          integer *ja, integer *jlmax, integer *il, integer *jl, integer *ijl,
          integer *jumax, integer *iu, integer *ju, integer *iju, integer *q,
          integer *ira, integer *jra, integer *irac, integer *irl, integer *jrl,
          integer *iru, integer *jru, integer *flag__);
        static int snnfc_(integer *n, integer *r__, integer *c__, integer *ic,
          integer *ia, integer *ja, real *a, real *z__, real *b, integer *lmax,
          integer *il, integer *jl, integer *ijl, real *l, real *d__, integer
          *umax, integer *iu, integer *ju, integer *iju, real *u, real *row,
          real *tmp, integer *irl, integer *jrl, integer *flag__);
        static int snnsc_(integer *n, integer *r__, integer *c__, integer *il,
          integer *jl, integer *ijl, real *l, real *d__, integer *iu, integer
          *ju, integer *iju, real *u, real *z__, real *b, real *tmp);
        static int snntc_(integer *n, integer *r__, integer *c__, integer *il,
          integer *jl, integer *ijl, real *l, real *d__, integer *iu, integer
          *ju, integer *iju, real *u, real *z__, real *b, real *tmp);
        static int sstoda_(integer *neq, real *y, real *yh, integer *nyh, real
          *yh1, real *ewt, real *savf, real *acor, real *wm, integer *iwm, S_fp
          f, U_fp jac, S_fp pjac, S_fp slvs);
        static int sprja_(integer *neq, real *y, real *yh, integer *nyh, real
          *ewt, real *ftem, real *savf, real *wm, integer *iwm, S_fp f, S_fp
          jac);
        static real smnorm_(integer *n, real *v, real *w);
        static real sfnorm_(integer *n, real *a, real *w);
        static real sbnorm_(integer *n, real *a, integer *nra, integer *ml,
          integer *mu, real *w);
        static int ssrcma_(real *rsav, integer *isav, integer *job);
        static int srchek_(integer *job, S_fp g, integer *neq, real *y, real
          *yh, integer *nyh, real *g0, real *g1, real *gx, integer *jroot,
          integer *irt);
        static int sroots_(integer *ng, real *hmin, integer *jflag, real *x0,
          real *x1, real *g0, real *g1, real *gx, real *x, integer *jroot);
        static int ssrcar_(real *rsav, integer *isav, integer *job);
        static int sstodpk_(integer *neq, real *y, real *yh, integer *nyh, real
          *yh1, real *ewt, real *savf, real *savx, real *acor, real *wm,
          integer *iwm, S_fp f, U_fp jac, U_fp psol);
        static int spkset_(integer *neq, real *y, real *ysv, real *ewt, real
          *ftem, real *savf, real *wm, integer *iwm, S_fp f, S_fp jac);
        static int ssolpk_(integer *neq, real *y, real *savf, real *x, real
          *ewt, real *wm, integer *iwm, S_fp f, U_fp psol);
        static int sspiom_(integer *neq, real *tn, real *y, real *savf, real *b,
          real *wght, integer *n, integer *maxl, integer *kmp, real *delta,
          real *hl0, integer *jpre, integer *mnewt, S_fp f, S_fp psol, integer
          *npsl, real *x, real *v, real *hes, integer *ipvt, integer *liom,
          real *wp, integer *iwp, real *wk, integer *iflag);
        static int satv_(integer *neq, real *y, real *savf, real *v, real *wght,
          real *ftem, S_fp f, S_fp psol, real *z__, real *vtem, real *wp,
          integer *iwp, real *hl0, integer *jpre, integer *ier, integer *npsl);
        static int sorthog_(real *vnew, real *v, real *hes, integer *n, integer
          *ll, integer *ldhes, integer *kmp, real *snormw);
        static int sspigmr_(integer *neq, real *tn, real *y, real *savf, real
          *b, real *wght, integer *n, integer *maxl, integer *maxlp1, integer
          *kmp, real *delta, real *hl0, integer *jpre, integer *mnewt, S_fp f,
          S_fp psol, integer *npsl, real *x, real *v, real *hes, real *q,
          integer *lgmr, real *wp, integer *iwp, real *wk, real *dl, integer
          *iflag);
        static int spcg_(integer *neq, real *tn, real *y, real *savf, real *r__,
          real *wght, integer *n, integer *maxl, real *delta, real *hl0,
          integer *jpre, integer *mnewt, S_fp f, S_fp psol, integer *npsl, real
          *x, real *p, real *w, real *z__, integer *lpcg, real *wp, integer
          *iwp, real *wk, integer *iflag);
        static int spcgs_(integer *neq, real *tn, real *y, real *savf, real
          *r__, real *wght, integer *n, integer *maxl, real *delta, real *hl0,
          integer *jpre, integer *mnewt, S_fp f, S_fp psol, integer *npsl, real
          *x, real *p, real *w, real *z__, integer *lpcg, real *wp, integer
          *iwp, real *wk, integer *iflag);
        static int satp_(integer *neq, real *y, real *savf, real *p, real *wght,
          real *hl0, real *wk, S_fp f, real *w);
        static int susol_(integer *neq, real *tn, real *y, real *savf, real *b,
          real *wght, integer *n, real *delta, real *hl0, integer *mnewt, S_fp
          psol, integer *npsl, real *x, real *wp, integer *iwp, real *wk,
          integer *iflag);
        static int ssrcpk_(real *rsav, integer *isav, integer *job);
        static int shefa_(real *a, integer *lda, integer *n, integer *ipvt,
          integer *info, integer *job);
        static int shesl_(real *a, integer *lda, integer *n, integer *ipvt,
          real *b);
        static int sheqr_(real *a, integer *lda, integer *n, real *q, integer
          *info, integer *ijob);
        static int shels_(real *a, integer *lda, integer *n, real *q, real *b);
        static int slhin_(integer *neq, integer *n, real *t0, real *y0, real
          *ydot, S_fp f, real *tout, real *uround, real *ewt, integer *itol,
          real *atol, real *y, real *temp, real *h0, integer *niter, integer
          *ier);
        static int sstoka_(integer *neq, real *y, real *yh, integer *nyh, real
          *yh1, real *ewt, real *savf, real *savx, real *acor, real *wm,
          integer *iwm, S_fp f, U_fp jac, U_fp psol);
        static int ssetpk_(integer *neq, real *y, real *ysv, real *ewt, real
          *ftem, real *savf, integer *jok, real *wm, integer *iwm, S_fp f, S_fp
          jac);
        static int ssrckr_(real *rsav, integer *isav, integer *job);
        static int sainvg_(S_fp res, S_fp adda, integer *neq, real *t, real *y,
          real *ydot, integer *miter, integer *ml, integer *mu, real *pw,
          integer *ipvt, integer *ier);
        static int sstodi_(integer *neq, real *y, real *yh, integer *nyh, real
          *yh1, real *ewt, real *savf, real *savr, real *acor, real *wm,
          integer *iwm, S_fp res, U_fp adda, U_fp jac, S_fp pjac, S_fp slvs);
        static int sprepji_(integer *neq, real *y, real *yh, integer *nyh, real
          *ewt, real *rtem, real *savr, real *s, real *wm, integer *iwm, S_fp
          res, S_fp jac, S_fp adda);
        static int saigbt_(S_fp res, S_fp adda, integer *neq, real *t, real *y,
          real *ydot, integer *mb, integer *nb, real *pw, integer *ipvt,
          integer *ier);
        static int spjibt_(integer *neq, real *y, real *yh, integer *nyh, real
          *ewt, real *rtem, real *savr, real *s, real *wm, integer *iwm, S_fp
          res, S_fp jac, S_fp adda);
        static int sslsbt_(real *wm, integer *iwm, real *x, real *tem);
        static int sdecbt_(integer *m, integer *n, real *a, real *b, real *c__,
          integer *ip, integer *ier);
        static int ssolbt_(integer *m, integer *n, real *a, real *b, real *c__,
          real *y, integer *ip);
        static int siprepi_(integer *neq, real *y, real *s, real *rwork,
          integer *ia, integer *ja, integer *ic, integer *jc, integer *ipflag,
          U_fp res, U_fp jac, U_fp adda);
        static int sprepi_(integer *neq, real *y, real *s, real *yh, real *savr,
          real *ewt, real *rtem, integer *ia, integer *ja, integer *ic, integer
          *jc, real *wk, integer *iwk, integer *ipper, S_fp res, S_fp jac, S_fp
          adda);
        static int sainvgs_(integer *neq, real *t, real *y, real *wk, integer
          *iwk, real *tem, real *ydot, integer *ier, S_fp res, S_fp adda);
        static int sprjis_(integer *neq, real *y, real *yh, integer *nyh, real
          *ewt, real *rtem, real *savr, real *s, real *wk, integer *iwk, S_fp
          res, S_fp jac, S_fp adda);

        static int dlsode_(S_fp f, integer *neq, doublereal *y, doublereal *t,
          doublereal *tout, integer *itol, doublereal *rtol, doublereal *atol,
          integer *itask, integer *istate, integer *iopt, doublereal *rwork,
          integer *lrw, integer *iwork, integer *liw, U_fp jac, integer *mf);
        static int dlsodes_(S_fp f, integer *neq, doublereal *y, doublereal *t,
          doublereal *tout, integer *itol, doublereal *rtol, doublereal *atol,
          integer *itask, integer *istate, integer *iopt, doublereal *rwork,
          integer *lrw, integer *iwork, integer *liw, U_fp jac, integer *mf);
        static int dlsoda_(S_fp f, integer *neq, doublereal *y, doublereal *t,
          doublereal *tout, integer *itol, doublereal *rtol, doublereal *atol,
          integer *itask, integer *istate, integer *iopt, doublereal *rwork,
          integer *lrw, integer *iwork, integer *liw, U_fp jac, integer *jt);
        static int dlsodar_(S_fp f, integer *neq, doublereal *y, doublereal *t,
          doublereal *tout, integer *itol, doublereal *rtol, doublereal *atol,
          integer *itask, integer *istate, integer *iopt, doublereal *rwork,
          integer *lrw, integer *iwork, integer *liw, U_fp jac, integer *jt,
          U_fp g, integer *ng, integer *jroot);
        static int dlsodpk_(S_fp f, integer *neq, doublereal *y, doublereal *t,
          doublereal *tout, integer *itol, doublereal *rtol, doublereal *atol,
          integer *itask, integer *istate, integer *iopt, doublereal *rwork,
          integer *lrw, integer *iwork, integer *liw, U_fp jac, U_fp psol,
          integer *mf);
        static int dlsodkr_(S_fp f, integer *neq, doublereal *y, doublereal *t,
          doublereal *tout, integer *itol, doublereal *rtol, doublereal *atol,
          integer *itask, integer *istate, integer *iopt, doublereal *rwork,
          integer *lrw, integer *iwork, integer *liw, U_fp jac, U_fp psol,
          integer *mf, U_fp g, integer *ng, integer *jroot);
        static int dlsodi_(S_fp res, U_fp adda, U_fp jac, integer *neq,
          doublereal *y, doublereal *ydoti, doublereal *t, doublereal *tout,
          integer *itol, doublereal *rtol, doublereal *atol, integer *itask,
          integer *istate, integer *iopt, doublereal *rwork, integer *lrw,
          integer *iwork, integer *liw, integer *mf);
        static int dlsoibt_(S_fp res, U_fp adda, U_fp jac, integer *neq,
          doublereal *y, doublereal *ydoti, doublereal *t, doublereal *tout,
          integer *itol, doublereal *rtol, doublereal *atol, integer *itask,
          integer *istate, integer *iopt, doublereal *rwork, integer *lrw,
          integer *iwork, integer *liw, integer *mf);
        static int dlsodis_(S_fp res, U_fp adda, U_fp jac, integer *neq,
          doublereal *y, doublereal *ydoti, doublereal *t, doublereal *tout,
          integer *itol, doublereal *rtol, doublereal *atol, integer *itask,
          integer *istate, integer *iopt, doublereal *rwork, integer *lrw,
          integer *iwork, integer *liw, integer *mf);

        static int dgefa_(doublereal *a, integer *lda, integer *n, integer
          *ipvt, integer *info);
        static int dgesl_(doublereal *a, integer *lda, integer *n, integer
          *ipvt, doublereal *b, integer *job);
        static int dgbfa_(doublereal *abd, integer *lda, integer *n, integer
          *ml, integer *mu, integer *ipvt, integer *info);
        static int dgbsl_(doublereal *abd, integer *lda, integer *n, integer
          *ml, integer *mu, integer *ipvt, doublereal *b, integer *job);
        static int daxpy_(integer *n, doublereal *da, doublereal *dx, integer
          *incx, doublereal *dy, integer *incy);
        static int dcopy_(integer *n, doublereal *dx, integer *incx, doublereal
          *dy, integer *incy);
        static doublereal ddot_(integer *n, doublereal *dx, integer *incx,
          doublereal *dy, integer *incy);
        static doublereal dnrm2_(integer *n, doublereal *dx, integer *incx);
        static int dscal_(integer *n, doublereal *da, doublereal *dx, integer
          *incx);
        static integer idamax_(integer *n, doublereal *dx, integer *incx);
        static int xerrwd_(char *msg, integer *nmes, integer *nerr, integer
          *level, integer *ni, integer *i1, integer *i2, integer *nr,
          doublereal *r1, doublereal *r2, ftnlen msg_len);

        static doublereal dumach_();
        static int dumsum_(doublereal *a, doublereal *b, doublereal *c__);
        static int dcfode_(integer *meth, doublereal *elco, doublereal *tesco);
        static int dintdy_(doublereal *t, integer *k, doublereal *yh, integer
          *nyh, doublereal *dky, integer *iflag);
        static int dprepj_(integer *neq, doublereal *y, doublereal *yh, integer
          *nyh, doublereal *ewt, doublereal *ftem, doublereal *savf, doublereal
          *wm, integer *iwm, S_fp f, S_fp jac);
        static int dsolsy_(doublereal *wm, integer *iwm, doublereal *x,
          doublereal *tem);
        static int dsrcom_(doublereal *rsav, integer *isav, integer *job);
        static int dstode_(integer *neq, doublereal *y, doublereal *yh, integer
          *nyh, doublereal *yh1, doublereal *ewt, doublereal *savf, doublereal
          *acor, doublereal *wm, integer *iwm, S_fp f, U_fp jac, S_fp pjac,
          S_fp slvs);
        static int dewset_(integer *n, integer *itol, doublereal *rtol,
          doublereal *atol, doublereal *ycur, doublereal *ewt);
        static doublereal dvnorm_(integer *n, doublereal *v, doublereal *w);
        static int diprep_(integer *neq, doublereal *y, doublereal *rwork,
          integer *ia, integer *ja, integer *ipflag, U_fp f, U_fp jac);
        static int dprep_(integer *neq, doublereal *y, doublereal *yh,
          doublereal *savf, doublereal *ewt, doublereal *ftem, integer *ia,
          integer *ja, doublereal *wk, integer *iwk, integer *ipper, S_fp f,
          S_fp jac);
        static int dprjs_(integer *neq, doublereal *y, doublereal *yh, integer
          *nyh, doublereal *ewt, doublereal *ftem, doublereal *savf, doublereal
          *wk, integer *iwk, S_fp f, S_fp jac);
        static int dsolss_(doublereal *wk, integer *iwk, doublereal *x,
          doublereal *tem);
        static int dsrcms_(doublereal *rsav, integer *isav, integer *job);
        static int odrv_(integer *n, integer *ia, integer *ja, doublereal *a,
          integer *p, integer *ip, integer *nsp, integer *isp, integer *path,
          integer *flag__);
        static int sro_(integer *n, integer *ip, integer *ia, integer *ja,
          doublereal *a, integer *q, integer *r__, logical *dflag);
        static int cdrv_(integer *n, integer *r__, integer *c__, integer *ic,
          integer *ia, integer *ja, doublereal *a, doublereal *b, doublereal
          *z__, integer *nsp, integer *isp, doublereal *rsp, integer *esp,
          integer *path, integer *flag__);
        static int nroc_(integer *n, integer *ic, integer *ia, integer *ja,
          doublereal *a, integer *jar, doublereal *ar, integer *p, integer
          *flag__);
        static int nsfc_(integer *n, integer *r__, integer *ic, integer *ia,
          integer *ja, integer *jlmax, integer *il, integer *jl, integer *ijl,
          integer *jumax, integer *iu, integer *ju, integer *iju, integer *q,
          integer *ira, integer *jra, integer *irac, integer *irl, integer *jrl,
          integer *iru, integer *jru, integer *flag__);
        static int nnfc_(integer *n, integer *r__, integer *c__, integer *ic,
          integer *ia, integer *ja, doublereal *a, doublereal *z__, doublereal
          *b, integer *lmax, integer *il, integer *jl, integer *ijl, doublereal
          *l, doublereal *d__, integer *umax, integer *iu, integer *ju, integer
          *iju, doublereal *u, doublereal *row, doublereal *tmp, integer *irl,
          integer *jrl, integer *flag__);
        static int nnsc_(integer *n, integer *r__, integer *c__, integer *il,
          integer *jl, integer *ijl, doublereal *l, doublereal *d__, integer
          *iu, integer *ju, integer *iju, doublereal *u, doublereal *z__,
          doublereal *b, doublereal *tmp);
        static int nntc_(integer *n, integer *r__, integer *c__, integer *il,
          integer *jl, integer *ijl, doublereal *l, doublereal *d__, integer
          *iu, integer *ju, integer *iju, doublereal *u, doublereal *z__,
          doublereal *b, doublereal *tmp);
        static int dstoda_(integer *neq, doublereal *y, doublereal *yh, integer
          *nyh, doublereal *yh1, doublereal *ewt, doublereal *savf, doublereal
          *acor, doublereal *wm, integer *iwm, S_fp f, U_fp jac, S_fp pjac,
          S_fp slvs);
        static int dprja_(integer *neq, doublereal *y, doublereal *yh, integer
          *nyh, doublereal *ewt, doublereal *ftem, doublereal *savf, doublereal
          *wm, integer *iwm, S_fp f, S_fp jac);
        static doublereal dmnorm_(integer *n, doublereal *v, doublereal *w);
        static doublereal dfnorm_(integer *n, doublereal *a, doublereal *w);
        static doublereal dbnorm_(integer *n, doublereal *a, integer *nra,
          integer *ml, integer *mu, doublereal *w);
        static int dsrcma_(doublereal *rsav, integer *isav, integer *job);
        static int drchek_(integer *job, S_fp g, integer *neq, doublereal *y,
          doublereal *yh, integer *nyh, doublereal *g0, doublereal *g1,
          doublereal *gx, integer *jroot, integer *irt);
        static int droots_(integer *ng, doublereal *hmin, integer *jflag,
          doublereal *x0, doublereal *x1, doublereal *g0, doublereal *g1,
          doublereal *gx, doublereal *x, integer *jroot);
        static int dsrcar_(doublereal *rsav, integer *isav, integer *job);
        static int dstodpk_(integer *neq, doublereal *y, doublereal *yh,
          integer *nyh, doublereal *yh1, doublereal *ewt, doublereal *savf,
          doublereal *savx, doublereal *acor, doublereal *wm, integer *iwm,
          S_fp f, U_fp jac, U_fp psol);
        static int dpkset_(integer *neq, doublereal *y, doublereal *ysv,
          doublereal *ewt, doublereal *ftem, doublereal *savf, doublereal *wm,
          integer *iwm, S_fp f, S_fp jac);
        static int dsolpk_(integer *neq, doublereal *y, doublereal *savf,
          doublereal *x, doublereal *ewt, doublereal *wm, integer *iwm, S_fp f,
          U_fp psol);
        static int dspiom_(integer *neq, doublereal *tn, doublereal *y,
          doublereal *savf, doublereal *b, doublereal *wght, integer *n,
          integer *maxl, integer *kmp, doublereal *delta, doublereal *hl0,
          integer *jpre, integer *mnewt, S_fp f, S_fp psol, integer *npsl,
          doublereal *x, doublereal *v, doublereal *hes, integer *ipvt, integer
          *liom, doublereal *wp, integer *iwp, doublereal *wk, integer *iflag);
        static int datv_(integer *neq, doublereal *y, doublereal *savf,
          doublereal *v, doublereal *wght, doublereal *ftem, S_fp f, S_fp psol,
          doublereal *z__, doublereal *vtem, doublereal *wp, integer *iwp,
          doublereal *hl0, integer *jpre, integer *ier, integer *npsl);
        static int dorthog_(doublereal *vnew, doublereal *v, doublereal *hes,
          integer *n, integer *ll, integer *ldhes, integer *kmp, doublereal
          *snormw);
        static int dspigmr_(integer *neq, doublereal *tn, doublereal *y,
          doublereal *savf, doublereal *b, doublereal *wght, integer *n,
          integer *maxl, integer *maxlp1, integer *kmp, doublereal *delta,
          doublereal *hl0, integer *jpre, integer *mnewt, S_fp f, S_fp psol,
          integer *npsl, doublereal *x, doublereal *v, doublereal *hes,
          doublereal *q, integer *lgmr, doublereal *wp, integer *iwp,
          doublereal *wk, doublereal *dl, integer *iflag);
        static int dpcg_(integer *neq, doublereal *tn, doublereal *y,
          doublereal *savf, doublereal *r__, doublereal *wght, integer *n,
          integer *maxl, doublereal *delta, doublereal *hl0, integer *jpre,
          integer *mnewt, S_fp f, S_fp psol, integer *npsl, doublereal *x,
          doublereal *p, doublereal *w, doublereal *z__, integer *lpcg,
          doublereal *wp, integer *iwp, doublereal *wk, integer *iflag);
        static int dpcgs_(integer *neq, doublereal *tn, doublereal *y,
          doublereal *savf, doublereal *r__, doublereal *wght, integer *n,
          integer *maxl, doublereal *delta, doublereal *hl0, integer *jpre,
          integer *mnewt, S_fp f, S_fp psol, integer *npsl, doublereal *x,
          doublereal *p, doublereal *w, doublereal *z__, integer *lpcg,
          doublereal *wp, integer *iwp, doublereal *wk, integer *iflag);
        static int datp_(integer *neq, doublereal *y, doublereal *savf,
          doublereal *p, doublereal *wght, doublereal *hl0, doublereal *wk,
          S_fp f, doublereal *w);
        static int dusol_(integer *neq, doublereal *tn, doublereal *y,
          doublereal *savf, doublereal *b, doublereal *wght, integer *n,
          doublereal *delta, doublereal *hl0, integer *mnewt, S_fp psol,
          integer *npsl, doublereal *x, doublereal *wp, integer *iwp,
          doublereal *wk, integer *iflag);
        static int dsrcpk_(doublereal *rsav, integer *isav, integer *job);
        static int dhefa_(doublereal *a, integer *lda, integer *n, integer
          *ipvt, integer *info, integer *job);
        static int dhesl_(doublereal *a, integer *lda, integer *n, integer
          *ipvt, doublereal *b);
        static int dheqr_(doublereal *a, integer *lda, integer *n, doublereal
          *q, integer *info, integer *ijob);
        static int dhels_(doublereal *a, integer *lda, integer *n, doublereal
          *q, doublereal *b);
        static int dlhin_(integer *neq, integer *n, doublereal *t0, doublereal
          *y0, doublereal *ydot, S_fp f, doublereal *tout, doublereal *uround,
          doublereal *ewt, integer *itol, doublereal *atol, doublereal *y,
          doublereal *temp, doublereal *h0, integer *niter, integer *ier);
        static int dstoka_(integer *neq, doublereal *y, doublereal *yh, integer
          *nyh, doublereal *yh1, doublereal *ewt, doublereal *savf, doublereal
          *savx, doublereal *acor, doublereal *wm, integer *iwm, S_fp f, U_fp
          jac, U_fp psol);
        static int dsetpk_(integer *neq, doublereal *y, doublereal *ysv,
          doublereal *ewt, doublereal *ftem, doublereal *savf, integer *jok,
          doublereal *wm, integer *iwm, S_fp f, S_fp jac);
        static int dsrckr_(doublereal *rsav, integer *isav, integer *job);
        static int dainvg_(S_fp res, S_fp adda, integer *neq, doublereal *t,
          doublereal *y, doublereal *ydot, integer *miter, integer *ml, integer
          *mu, doublereal *pw, integer *ipvt, integer *ier);
        static int dstodi_(integer *neq, doublereal *y, doublereal *yh, integer
          *nyh, doublereal *yh1, doublereal *ewt, doublereal *savf, doublereal
          *savr, doublereal *acor, doublereal *wm, integer *iwm, S_fp res, U_fp
          adda, U_fp jac, S_fp pjac, S_fp slvs);
        static int dprepji_(integer *neq, doublereal *y, doublereal *yh,
          integer *nyh, doublereal *ewt, doublereal *rtem, doublereal *savr,
          doublereal *s, doublereal *wm, integer *iwm, S_fp res, S_fp jac, S_fp
          adda);
        static int daigbt_(S_fp res, S_fp adda, integer *neq, doublereal *t,
          doublereal *y, doublereal *ydot, integer *mb, integer *nb, doublereal
          *pw, integer *ipvt, integer *ier);
        static int dpjibt_(integer *neq, doublereal *y, doublereal *yh, integer
          *nyh, doublereal *ewt, doublereal *rtem, doublereal *savr, doublereal
          *s, doublereal *wm, integer *iwm, S_fp res, S_fp jac, S_fp adda);
        static int dslsbt_(doublereal *wm, integer *iwm, doublereal *x,
          doublereal *tem);
        static int ddecbt_(integer *m, integer *n, doublereal *a, doublereal *b,
          doublereal *c__, integer *ip, integer *ier);
        static int dsolbt_(integer *m, integer *n, doublereal *a, doublereal *b,
          doublereal *c__, doublereal *y, integer *ip);
        static int diprepi_(integer *neq, doublereal *y, doublereal *s,
          doublereal *rwork, integer *ia, integer *ja, integer *ic, integer *jc,
          integer *ipflag, U_fp res, U_fp jac, U_fp adda);
        static int dprepi_(integer *neq, doublereal *y, doublereal *s,
          doublereal *yh, doublereal *savr, doublereal *ewt, doublereal *rtem,
          integer *ia, integer *ja, integer *ic, integer *jc, doublereal *wk,
          integer *iwk, integer *ipper, S_fp res, S_fp jac, S_fp adda);
        static int dainvgs_(integer *neq, doublereal *t, doublereal *y,
          doublereal *wk, integer *iwk, doublereal *tem, doublereal *ydot,
          integer *ier, S_fp res, S_fp adda);
        static int dprjis_(integer *neq, doublereal *y, doublereal *yh, integer
          *nyh, doublereal *ewt, doublereal *rtem, doublereal *savr, doublereal
          *s, doublereal *wk, integer *iwk, S_fp res, S_fp jac, S_fp adda);
    };
  }
}
